Optimal. Leaf size=149 \[ \frac {(2 A+i B) x}{8 a c^3}-\frac {A+i B}{16 a c^3 f (i-\tan (e+f x))}-\frac {A-i B}{12 a c^3 f (i+\tan (e+f x))^3}+\frac {i A}{8 a c^3 f (i+\tan (e+f x))^2}+\frac {3 A+i B}{16 a c^3 f (i+\tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 78, 209}
\begin {gather*} -\frac {A+i B}{16 a c^3 f (-\tan (e+f x)+i)}+\frac {3 A+i B}{16 a c^3 f (\tan (e+f x)+i)}-\frac {A-i B}{12 a c^3 f (\tan (e+f x)+i)^3}+\frac {x (2 A+i B)}{8 a c^3}+\frac {i A}{8 a c^3 f (\tan (e+f x)+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 209
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))^3} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^2 (c-i c x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {-A-i B}{16 a^2 c^4 (-i+x)^2}+\frac {A-i B}{4 a^2 c^4 (i+x)^4}-\frac {i A}{4 a^2 c^4 (i+x)^3}+\frac {-3 A-i B}{16 a^2 c^4 (i+x)^2}+\frac {2 A+i B}{8 a^2 c^4 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {A+i B}{16 a c^3 f (i-\tan (e+f x))}-\frac {A-i B}{12 a c^3 f (i+\tan (e+f x))^3}+\frac {i A}{8 a c^3 f (i+\tan (e+f x))^2}+\frac {3 A+i B}{16 a c^3 f (i+\tan (e+f x))}+\frac {(2 A+i B) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 a c^3 f}\\ &=\frac {(2 A+i B) x}{8 a c^3}-\frac {A+i B}{16 a c^3 f (i-\tan (e+f x))}-\frac {A-i B}{12 a c^3 f (i+\tan (e+f x))^3}+\frac {i A}{8 a c^3 f (i+\tan (e+f x))^2}+\frac {3 A+i B}{16 a c^3 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.12, size = 203, normalized size = 1.36 \begin {gather*} \frac {(\cos (3 (e+f x))+i \sin (3 (e+f x))) (-18 A+3 (A (-2-8 i f x)+B (i+4 f x)) \cos (2 (e+f x))+2 (A+2 i B) \cos (4 (e+f x))-6 i A \sin (2 (e+f x))-3 B \sin (2 (e+f x))-24 A f x \sin (2 (e+f x))-12 i B f x \sin (2 (e+f x))-4 i A \sin (4 (e+f x))+2 B \sin (4 (e+f x))) (A+B \tan (e+f x))}{96 a c^3 f (A \cos (e+f x)+B \sin (e+f x)) (-i+\tan (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 128, normalized size = 0.86
method | result | size |
derivativedivides | \(\frac {\frac {i A}{8 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {\frac {A}{4}-\frac {i B}{4}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {3 A}{16}-\frac {i B}{16}}{i+\tan \left (f x +e \right )}+\left (-\frac {B}{16}+\frac {i A}{8}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {-\frac {A}{16}-\frac {i B}{16}}{-i+\tan \left (f x +e \right )}+\left (\frac {B}{16}-\frac {i A}{8}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )}{f a \,c^{3}}\) | \(128\) |
default | \(\frac {\frac {i A}{8 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {\frac {A}{4}-\frac {i B}{4}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {3 A}{16}-\frac {i B}{16}}{i+\tan \left (f x +e \right )}+\left (-\frac {B}{16}+\frac {i A}{8}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {-\frac {A}{16}-\frac {i B}{16}}{-i+\tan \left (f x +e \right )}+\left (\frac {B}{16}-\frac {i A}{8}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )}{f a \,c^{3}}\) | \(128\) |
risch | \(\frac {i x B}{8 a \,c^{3}}+\frac {x A}{4 a \,c^{3}}-\frac {{\mathrm e}^{6 i \left (f x +e \right )} B}{96 a \,c^{3} f}-\frac {i {\mathrm e}^{6 i \left (f x +e \right )} A}{96 a \,c^{3} f}-\frac {{\mathrm e}^{4 i \left (f x +e \right )} B}{32 a \,c^{3} f}-\frac {i {\mathrm e}^{4 i \left (f x +e \right )} A}{16 a \,c^{3} f}-\frac {\cos \left (2 f x +2 e \right ) B}{32 a \,c^{3} f}-\frac {5 i \cos \left (2 f x +2 e \right ) A}{32 a \,c^{3} f}+\frac {i \sin \left (2 f x +2 e \right ) B}{32 a \,c^{3} f}+\frac {7 \sin \left (2 f x +2 e \right ) A}{32 a \,c^{3} f}\) | \(195\) |
norman | \(\frac {\frac {\left (i B +2 A \right ) x}{8 a c}-\frac {4 i A +B}{12 a c f}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{4 a c f}+\frac {\left (-i B +6 A \right ) \tan \left (f x +e \right )}{8 a c f}+\frac {\left (i B +2 A \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{3 a c f}+\frac {\left (i B +2 A \right ) \left (\tan ^{5}\left (f x +e \right )\right )}{8 a c f}+\frac {3 \left (i B +2 A \right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{8 a c}+\frac {3 \left (i B +2 A \right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{8 a c}+\frac {\left (i B +2 A \right ) x \left (\tan ^{6}\left (f x +e \right )\right )}{8 a c}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{3} c^{2}}\) | \(226\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 8.49, size = 97, normalized size = 0.65 \begin {gather*} \frac {{\left (12 \, {\left (2 \, A + i \, B\right )} f x e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, A - B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 3 \, {\left (2 i \, A + B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} - 18 i \, A e^{\left (4 i \, f x + 4 i \, e\right )} + 3 i \, A - 3 \, B\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{96 \, a c^{3} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.34, size = 328, normalized size = 2.20 \begin {gather*} \begin {cases} \frac {\left (- 294912 i A a^{3} c^{9} f^{3} e^{4 i e} e^{2 i f x} + \left (49152 i A a^{3} c^{9} f^{3} - 49152 B a^{3} c^{9} f^{3}\right ) e^{- 2 i f x} + \left (- 98304 i A a^{3} c^{9} f^{3} e^{6 i e} - 49152 B a^{3} c^{9} f^{3} e^{6 i e}\right ) e^{4 i f x} + \left (- 16384 i A a^{3} c^{9} f^{3} e^{8 i e} - 16384 B a^{3} c^{9} f^{3} e^{8 i e}\right ) e^{6 i f x}\right ) e^{- 2 i e}}{1572864 a^{4} c^{12} f^{4}} & \text {for}\: a^{4} c^{12} f^{4} e^{2 i e} \neq 0 \\x \left (- \frac {2 A + i B}{8 a c^{3}} + \frac {\left (A e^{8 i e} + 4 A e^{6 i e} + 6 A e^{4 i e} + 4 A e^{2 i e} + A - i B e^{8 i e} - 2 i B e^{6 i e} + 2 i B e^{2 i e} + i B\right ) e^{- 2 i e}}{16 a c^{3}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (2 A + i B\right )}{8 a c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.79, size = 192, normalized size = 1.29 \begin {gather*} -\frac {\frac {6 \, {\left (-2 i \, A + B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a c^{3}} + \frac {6 \, {\left (2 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a c^{3}} + \frac {6 \, {\left (-2 i \, A \tan \left (f x + e\right ) + B \tan \left (f x + e\right ) - 3 \, A - 2 i \, B\right )}}{a c^{3} {\left (\tan \left (f x + e\right ) - i\right )}} + \frac {22 i \, A \tan \left (f x + e\right )^{3} - 11 \, B \tan \left (f x + e\right )^{3} - 84 \, A \tan \left (f x + e\right )^{2} - 39 i \, B \tan \left (f x + e\right )^{2} - 114 i \, A \tan \left (f x + e\right ) + 45 \, B \tan \left (f x + e\right ) + 60 \, A + 9 i \, B}{a c^{3} {\left (\tan \left (f x + e\right ) + i\right )}^{3}}}{96 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.11, size = 161, normalized size = 1.08 \begin {gather*} \frac {\frac {B}{12\,a\,c^3}+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (-\frac {B}{4\,a\,c^3}+\frac {A\,1{}\mathrm {i}}{2\,a\,c^3}\right )+{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {A}{4\,a\,c^3}+\frac {B\,1{}\mathrm {i}}{8\,a\,c^3}\right )-\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {A}{12\,a\,c^3}+\frac {B\,1{}\mathrm {i}}{24\,a\,c^3}\right )+\frac {A\,1{}\mathrm {i}}{3\,a\,c^3}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+{\mathrm {tan}\left (e+f\,x\right )}^3\,2{}\mathrm {i}+\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}-1\right )}-\frac {x\,\left (-B+A\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,a\,c^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________